/* Move it out of the way */
.rgh-recently-pushed-branches [data-url$='recently_touched_branches_list'] {
	position: relative;
	margin-left: auto;
	margin-right: 6px;
	line-height: 28px; /* Adjust size as well */
}

.rgh-recently-pushed-branches [data-url$='recently_touched_branches_list'] .mb-3 {
	margin-bottom: 0 !important;
	position: absolute;
	top: -19px;
	right: 10px;
	z-index: 32; /* Set z-index higher than ul.pagehead-actions */
	white-space: nowrap;
	animation: rgh-slide-in-right 0.3s ease-out;
}
/* Fix positioning on GHE */
.rgh-recently-pushed-branches.enterprise [data-url$='recently_touched_branches_list'] .mb-3 {
	top: -1px;
}

/* Pre "Repository refresh" layout */
.rgh-recently-pushed-branches [data-url$='recently_touched_branches_list'] p {
	display: none;
}

.rgh-recently-pushed-branches .Header .RecentBranches, /* Pre "Repository refresh" layout */
.rgh-recently-pushed-branches [data-url$='recently_touched_branches_list'] .Box {
	display: flex;
	width: max-content;
	overflow: hidden;
	margin-left: auto;
	flex-direction: column-reverse;
	background: none;
	border-color: currentColor !important;
	border-top: 1px solid !important;
	background-color: #24292e;
}

.rgh-recently-pushed-branches .Header .RecentBranches .octicon-git-branch, /* Pre "Repository refresh" layout */
.rgh-recently-pushed-branches [data-url$='recently_touched_branches_list'] .Box .octicon-git-branch {
	vertical-align: middle;
	margin-right: 2px;
}

/* Pre "Repository refresh" layout */
.rgh-recently-pushed-branches .Header .RecentBranches .btn {
	font-size: 0; /* Hide text */
}

/* Pre "Repository refresh" layout */
.rgh-recently-pushed-branches .Header .RecentBranches:not(:hover) .btn {
	background: #5d5d5d;
}

/* Pre "Repository refresh" layout */
.rgh-recently-pushed-branches .Header .RecentBranches .btn + div {
	margin-right: 8px;
	float: right;
	font-size: 11px;
}

/* Pre "Repository refresh" layout */
.rgh-recently-pushed-branches .Header .RecentBranches .btn .octicon {
	margin-top: 2px;
	float: right;
}

/* Hide CTA text */
.rgh-recently-pushed-branches [data-url$='recently_touched_branches_list'] .btn-link[href$='?expand=1'] {
	font-size: 0;
	line-height: 0;
	border: solid 1px;
	border-radius: 6px;
}

.rgh-recently-pushed-branches [data-url$='recently_touched_branches_list'] .btn-link[href$='?expand=1']:not(:hover) {
	opacity: 80%;
}

/* Make CTA icon bigger */
.rgh-recently-pushed-branches [data-url$='recently_touched_branches_list'] .octicon-chevron-right {
	height: 1.8rem !important;
	width: 2rem !important;
}

.rgh-recently-pushed-branches .RecentBranches-item + .RecentBranches-item, /* Pre "Repository refresh" layout */
.rgh-recently-pushed-branches [data-url$='recently_touched_branches_list'] .Box-row + .Box-row {
	border-top: none;
	border-bottom: 1px solid;
	border-color: inherit !important; /* Overrides .border-black-fade */
}

.rgh-recently-pushed-branches .Header .RecentBranches-item, /* Pre "Repository refresh" layout */
.rgh-recently-pushed-branches [data-url$='recently_touched_branches_list'] .Box-row {
	color: inherit;
	padding: 4px 6px !important;
}

.rgh-recently-pushed-branches .RecentBranches:not(:hover) .RecentBranches-item:not(:last-child), /* Pre "Repository refresh" layout */
.rgh-recently-pushed-branches [data-url$='recently_touched_branches_list'] .Box:not(:hover) .Box-row:not(:last-child) {
	/* Hide older branches */
	display: none !important;
}

.rgh-recently-pushed-branches .Header .RecentBranches:not(:hover) .RecentBranches-item:last-child, /* Pre "Repository refresh" layout */
.rgh-recently-pushed-branches [data-url$='recently_touched_branches_list'] .Box:not(:hover) .Box-row:last-child {
	border-bottom-width: 2px;
}

.rgh-recently-pushed-branches .Header .RecentBranches-item-link, /* Pre "Repository refresh" layout */
.rgh-recently-pushed-branches [data-url$='recently_touched_branches_list'] .link-gray-dark {
	max-width: 250px !important;
	font-size: 14px;
	color: #fff !important;
}

.rgh-recently-pushed-branches [data-url$='recently_touched_branches_list'] .btn-link {
	color: #fff !important;
}

@keyframes rgh-slide-in-right {
	from {
		transform: translateX(-30px);
		opacity: 0%;
	}
}
